Skip to content

Conversation

@giacomocavalieri
Copy link
Member

The compiler would raise an error for floating point literals outside of the representable range on the Erlang target. With this PR it raises the same warning on both targets!

@fruno-bulax
Copy link
Contributor

Does this not break compatibility since it was previously allowed? Maybe it could be a warning for the javascript target instead?

Either way, could you please update the documentation on LiteralFloatValue, since it talks about this overflow into infinity as if it were legitimate.

@lpil
Copy link
Member

lpil commented Nov 20, 2025

Previously we generated invalid code, so this is a fix. No correctly compiling code would be prevented by this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants